{include_core file="m/lib/header.html" title="个人中心" center="center"}

<div class="title">
  <div class="title-user clearfix">
    <h2><img src="{user_helper::avatar($user_info.id)}"/></h2>
    <p>{user_helper::get_nick_name($user_info.id)}</p>
    <a href="{AnUrl('user/logout')}" class="exit-btn">退出</a>
  </div>
  <div class="user-box">
    <ul class="clearfix">
      <li>
        <p>{fav_helper::get_fav_num_by_user($user_info.id)}</p>
        <h3>收藏</h3>
      </li>
      <li>
        <p>0</p>
        <h3>兑换券</h3>
      </li>
      <li>
        <p class="js_bbsCredit"><img src="{$smarty.const.STATIC_URL}/images/loading-red.gif" width="20" alt=""></p>
        <h3>积分</h3>
        <script>
          function getCredit(){
            $.getJSON("{AnUrl('user/setting/get_credit')}", function(json){
              if (json.info == 'ok') {
                $('.js_bbsCredit').html(json.credit);
              } else {
                $('.js_bbsCredit').html('0');
              }
            });
          }
          $(function(){
            getCredit();
          });
        </script>
      </li>
    </ul>
  </div>
</div>
<!--title  end-->

{* 优先展示未发货的订单 *}
{$order_unfinished_list = array_merge($order_express_list, $order_has_list)}
{if $order_unfinished_list}
<div class="line"></div>
<div class="order">
  <p class="order-title"><span>{order_helper::get_order_total(1) + order_helper::get_order_total(15)}</span>个未完成订单</p>
  {foreach $order_unfinished_list as $k=>$v}
    <div class="order-list clearfix">
      <div class="order-l">
        <h2><img src="{_image($v.detail[0].goods_cover, 'middle')}" width="92" /></h2>
        <p>{$v.detail[0].goods_title}</p>
      </div>
      <div class="order-r">
        <a class="order-btn">{order_config::$dealer_progress[$v.progress]}</a>
        <a class="order-btn2" href="{AnUrl("order/{$v.id}")}">订单详情</a>
      </div>
    </div>
    <!--order-list  end-->
  {/foreach}
</div>
{/if}

<div class="line"></div>
<div class="menu">
  <div class="menu-list">
    <a href="{AnUrl('order')}">
      <h2><img src="{$smarty.const.STATIC_URL}/images/m2-images/title-1.png"/></h2>
      <p>我的订单</p>
    </a>
  </div>
  <div class="menu-list menu-border">
    <a href="{AnUrl('comment')}">
      <h2><img src="{$smarty.const.STATIC_URL}/images/m2-images/title-2.png"/></h2>
      <p>商品评价</p>
    </a>
  </div>
  <div class="line"></div>
  <div class="menu-list">
    <a href="{AnUrl('address')}">
      <h2><img src="{$smarty.const.STATIC_URL}/images/m2-images/title-3.png"/></h2>
      <p>收货地址</p>
    </a>
  </div>
  <div class="menu-list">
    <a href="{AnUrl('user/setting/user_info')}">
      <h2><img src="{$smarty.const.STATIC_URL}/images/m2-images/title-4.png"/></h2>
      <p>基本资料</p>
    </a>
  </div>
  <div class="menu-list menu-border">
    <a href="{AnUrl('user/setting/account_safety')}">
      <h2><img src="{$smarty.const.STATIC_URL}/images/m2-images/title-5.png"/></h2>
      <p>账号安全</p>
    </a>
  </div>
  <div class="line"></div>
  {*<div class="menu-list">
    <a href="{AnUrl('barter')}">
      <h2><img src="{$smarty.const.STATIC_URL}/images/m2-images/title-6.png"/></h2>
      <p>换货单</p>
    </a>
  </div>*}
  <div class="menu-list">
    <a href="{AnUrl('refund')}">
      <h2><img src="{$smarty.const.STATIC_URL}/images/m2-images/title-7.png"/></h2>
      <p>退货单</p>
    </a>
  </div>
  <div class="menu-list">
    <a href="{AnUrl('repair')}">
      <h2><img src="{$smarty.const.STATIC_URL}/images/m2-images/title-8.png"/></h2>
      <p>维修单</p>
    </a>
  </div>
</div>

{include_core file="m/lib/footer.html"}